from rest_framework import serializers
from member import models
class LevelSer(serializers.ModelSerializer):
    class Meta:
        model = models.Level
        fields = '__all__'
class MemberSer(serializers.ModelSerializer):
    lname=serializers.SerializerMethodField(read_only=True)
    def get_lname(self,obj):
        return obj.level.name
    class Meta:
        model = models.Member
        fields = '__all__'